<!--<?php
require_once uTemplate::PrintEot('header');
require_once uTemplate::PrintEot('profile_left');
print <<<EOT
-->
        <div class="contUser">
        	<div class="p15">
            	<h4 class="site"><span>帐号</span></h4>
                <div class="navC">
                    <ul id="infolist">
						<li id="base"><a href="javascript:;" hidefocus="true" onclick="selectTab('base')">基本资料</a></li>
						<li id="trade"><a href="javascript:;" hidefocus="true" onclick="selectTab('trade')">交易信息</a></li>
						<li id="link"><a href="javascript:;" hidefocus="true" onclick="selectTab('link')">联系方式</a></li>
						<li id="face"><a href="javascript:;" hidefocus="true" onclick="selectTab('face')">修改头像</a></li>
						<li id="safe"><a href="javascript:;" hidefocus="true" onclick="selectTab('safe')">密码安全</a></li>
<!--
EOT;
if ($_G['userbinding'] || $ubinding) {print <<<EOT
-->
						<li id="binding"><a href="javascript:;" hidefocus="true" onclick="selectTab('binding')">多帐号绑定</a></li>
<!--
EOT;
}if ($customfield) {print <<<EOT
-->
						<li id="other"><a href="javascript:;" hidefocus="true" onclick="selectTab('other')">扩展资料</a></li>
<!--
EOT;
}print <<<EOT
-->
                    </ul>
                </div>
				<table width="100%" height="450">
				<tr><td class="vt"><div class="p15">
					<form id="creator" name="creator" action="profile.php?action=modify&" method="post" onsubmit="return setFaceLen()">
					<input type="hidden" name="verify" value="$verifyhash" />
					<input type="hidden" value="2" name="step" />
					<input type="hidden" id="info_type" name="info_type" value="info_base" />
					<div style="display:none" id="info_base">
						<table width="100%" class="setTable">
<!--
EOT;
if($groupselect){print <<<EOT
-->
							<tr>
								<th class="th">头衔选择</th>
								<td class="td"><select name="newgroupid" class="select_wa mr10">$groupselect</select>选择一个用户组头衔作为你在站点上的头衔</td>
							</tr>
<!--
EOT;
}print <<<EOT
-->
							<tr>
								<th class="th">性别</th>
								<td class="td">
                                	<label for="progender0" class="mr20"><input type="radio" id="progender0" name="progender" value="0" $sexselect[0] /> 保密</label>
									<label for="progender1" class="mr20"><input type="radio" id="progender1" name="progender" value="1" $sexselect[1] /> 男</label>
									<label for="progender2" class="mr20"><input type="radio" id="progender2" name="progender" value="2" $sexselect[2] /> 女</label>
								</td>
							</tr>
							<tr>
								<th class="th">生日</th>
								<td class="td">
									<select name="proyear">
<!--
EOT;
if($rg_timestart < $rg_timeend){
for($i=$rg_timestart;$i<=$rg_timeend;$i++){print <<<EOT
-->
									<option value="$i" $yearslect[$i]>$i</option>
<!--
EOT;
}}else{
for($i=$rg_timestart;$i>=$rg_timeend;$i--){print <<<EOT
-->
									<option value="$i" $yearslect[$i]>$i</option>
<!--
EOT;
}}print <<<EOT
-->
									</select>
                                    <span class="p_lr_10">年</span>
									<select name="promonth">
<!--
EOT;
for($i=1;$i<=12;$i++){print <<<EOT
-->
										<option value="$i" $monthslect[$i]>$i</option>
<!--
EOT;
}print <<<EOT
-->
									</select><span class="p_lr_10">月</span>
									<select name="proday">
<!--
EOT;
for($i=1;$i<=31;$i++){print <<<EOT
-->
										<option value="$i" $dayslect[$i]>$i</option>
<!--
EOT;
}print <<<EOT
-->
									</select><span class="p_lr_10">日</span>
								</td>
							</tr>
<!--
EOT;
foreach($custominfo as $key => $value){print <<<EOT
-->
							<tr>
								<th class="th">$value[0]</th>
								<td class="td"><input class="input input_wa" type="text" name="customdata[$key]" value="{$customdata[$key]}" /></td>
							</tr>
<!--
EOT;
}print <<<EOT
-->
							<tr>
								<th class="th">来自</th>
								<td class="td"><input class="input input_wa" type="text" maxlength="14" name="profrom" value="$userdb[location]" /></td>
							</tr>
							<tr>
								<th class="th">个人主页</th>
								<td class="td"><input class="input input_wb mr5" type="text" maxlength="75" name="prohomepage" value="$userdb[site]" /><span>建议加 http://开头</span></td>
							</tr>
<!--
EOT;
if($_G[allowhonor]){print <<<EOT
-->
							<tr>
								<th class="th">个性签名</th>
								<td class="td">
									<input class="input input_wb mr10" type="text" name="prohonor" value="$userdb[honor]" />（将在帖子页面用户信息处显示）
								</td>
							</tr>
<!--
EOT;
}print <<<EOT
-->
							<tr>
								<th class="th">自我简介</th>
								<td class="td"><textarea name="prointroduce" id="prointroduce" class="textareaA mb5">$userdb[introduce]</textarea><p id="prointroduce_warn">限500字节</p></td>
							</tr>
							<tr>
								<th class="th">帖子签名</th>
								<td class="td"><textarea name="prosign" id="prosign" class="textareaA mb5">$userdb[signature]</textarea><p>（将在每个帖子下方显示，<span id="prosign_warn">限{$_G[signnum]}字节</span>）</p></td>
							</tr>
<!--
EOT;
if($db_signmoney && false!==strpos($db_signgroup,",$groupid,")){print <<<EOT
-->
							<tr>
								<th class="th">签名展示功能</th>
								<td class="td">
                                	<p class="mb5">
									<label for="showsign1" class="mr20"><input type="radio" id="showsign1" name="showsign" value="1" $prosign_Y /> 开启</label>
									<label for="showsign0"><input type="radio" id="showsign0" name="showsign" value="0" $prosign_N /> 关闭</label>
                                    </p>
                                    <p>（签名显示一天需要相应{$credit->cType[$db_signcurtype]}<b>$db_signmoney</b>{$credit->cUnit[$db_signcurtype]}）</p>
								</td>
							</tr>
<!--
EOT;
}print <<<EOT
-->
							<tr>
								<th class="th">时区选择<!--选择您所在的时区<br />将时间显示为您当地时间--></th>
								<td class="td">
									<select name="timedf" class="select_wa">
										<option value="0">使用默认</option>
<!--
EOT;
include(R_P.'template/admin/timezone.htm');print <<<EOT
-->
									</select>
								</td>
							</tr>
							<tr>
								<th class="th">是否接受邮件</th>
								<td class="td">
									<label for="proreceivemail1" class="mr20"><input type="radio" id="proreceivemail1" name="proreceivemail" value="1" $email_Y /> 接收邮件</label>
									<label for="proreceivemail0"><input type="radio" id="proreceivemail0" name="proreceivemail" value="0" $email_N /> 不接收邮件</label>
								</td>
							</tr>
						</table>
						<div class="tac" style=" padding:1em">
							<span class="btn"><span><button type="submit">保存资料</button></span></span>
						</div>
<script>
var charset = '$db_charset';
var signnum = '$_G[signnum]' * 1;
initCheckTextNum('prointroduce', 'prointroduce_warn', 500);
if (signnum) {
	initCheckTextNum('prosign','prosign_warn', signnum);
} else {
	getObj('prosign_warn').innerHTML = '不限字数';
}
</script>
					</div>
					<div style="display:none" id="info_trade">
						<table width="100%" class="setTable">
							<tr>
								<th class="th">支付宝帐号</th>
								<td class="td">
<!--
EOT;
if ($isAuthAlipay) {print<<<EOT
-->
									<div class="s5 mb5">$trade[alipay]</div>
									<ul style="line-height:24px;" class="mb10">
										<li><span class="s3 mr10">&#8730;已通过身份验证</span><a href="javascript:void(0)" class="mr10"  onclick="window.open('profile.php?action=auth&check_step=alipay', 'alipayCredit', 'height=520, width=1050');">重新验证</a></li>
<!--
EOT;
	if ($trade[iscertified] == 'T') {print<<<EOT
-->
										<li><span class="s3">&#8730;已通过实名认证</span></li>
<!--
EOT;
	} else {print <<<EOT
-->
										<li>尚未通过<a href="http://www.alipay.com" target="_blank">实名认证</a></li>
<!--
EOT;
	}
print <<<EOT
-->
									</ul>
<!--
EOT;
} else {print<<<EOT
-->
									<input class="input input_wa" type="text" name="alipay" value="$trade[alipay]" />
<!--
EOT;
	if ($db_authstate) {print <<<EOT
-->
									<a href="javascript:void(0)" class="mr10"  onclick="window.open('profile.php?action=auth&check_step=alipay', 'alipayCredit', 'height=520, width=1050');">[绑定]</a>
<!--
EOT;
	}
}print <<<EOT
-->
								</td>
							</tr>
							<tr>
								<th class="th">个人商品分类</th>
								<td class="td">
									<table width="240">
										<tr>
											<td width="60%" class="pb15">分类名</td>
											<td class="pb15"><a href="javascript:;" class="s3" onclick="addtrade();">[添加]</a></td>
										</tr>
										<tbody id="trade_mode" style="display:none"><tr>
											<td class="pb15"><input class="input" type="text" name="tradetype[]" size="18" /></td>
											<td class="pb15"><a href="javascript:;" onclick="removetrade(this);">[删除]</a></td>
										</tr></tbody>
										<tbody id="trade_c">
<!--
EOT;
if ($trade['tradetype']) {
foreach ($trade['tradetype'] as $key => $value) {print <<<EOT
-->
										<tr>
											<td class="pb15"><input class="input" type="text" name="tradetype[$key]" value="$value" size="18" /></td>
											<td class="pb15"><a href="javascript:;" onclick="removetrade(this);">[删除]</a></td>
										</tr>
<!--
EOT;
}}print <<<EOT
-->
										</tbody>
									</table>
								</td>
							</tr>
						</table>
						<div class="tac" style=" padding:1em">
							<span class="btn"><span><button type="submit">保存资料</button></span></span>
						</div>
<script>
function addtrade() {
	var s = getObj('trade_mode').firstChild.cloneNode(true);
	getObj('trade_c').appendChild(s);
}
function removetrade(obj) {
	var o = obj.parentNode.parentNode;
	o.parentNode.removeChild(o);
}
addtrade();
</script>
					</div>
					<div style="display:none" id="info_link">
						<table width="100%" class="setTable">
							<tr>
								<th class="th">手机号</th>
								<td class="td">
<!--
EOT;
if (!$db_authstate) {print <<<EOT
-->
									<input class="input" type="text" size="25" maxlength="16" name="proauthmobile" value="$userdb[authmobile]" />
<!--
EOT;
} elseif ($isAuthMobile) {print <<<EOT
-->
									<span id="td_span_mobile" class="mr20">$authmobile</span><img src="u/images/attest/mobile.gif" align="absmiddle" class="mr5"/>已绑定手机 <a id="a_edit_mobile" href="profile.php?action=auth&check_step=mobile">[修改]</a>
<!--
EOT;
} else {print <<<EOT
-->
									<input class="input" type="text" size="25" maxlength="16" name="proauthmobile" id="td_input_mobile" value="$userdb[authmobile]" />
									<a href="javascript:void(0);" onclick="checkMobile();return false;" class="mr10">[绑定]</a>
<!--
EOT;
}print <<<EOT
-->
								</td>
							</tr>
							<tr>
								<th class="th">QQ</th>
								<td class="td"><input class="input" type="text" size="25" maxlength="12" name="prooicq" value="$userdb[oicq]" /></td>
							</tr>
							<tr>
								<th class="th">阿里旺旺</th>
								<td class="td"><input class="input" type="text" size="25" maxlength="30" name="proaliww" value="$userdb[aliww]" /></td>
							</tr>
							<tr>
								<th class="th">Yahoo</th>
								<td class="td"><input class="input" type="text" size="25" name="proyahoo" value="$userdb[yahoo]" /></td>
							</tr>
							<tr>
								<th class="th">Msn</th>
								<td class="td"><input class="input" type="text" size="25" name="promsn" value="$userdb[msn]" /></td>
							</tr>
						</table>
						<div class="tac" style=" padding:1em">
							<span class="btn"><span><button type="submit">保存资料</button></span></span>
						</div>
					</div>
					<div style="display:none" id="info_face">
						<table width="100%" class="setTable vt">
							<tr>
								<td width="180">
									<img src="$iconurl?$timestamp" name="useravatars" class="img" $iconsize/>
								</td>
								<td>
									<div id="openchang">
                    <label class="mr20" for="facetype1"><input type="radio" id="facetype1" name="facetype" value="1" onclick="CkFaceType(this.value)">系统头像</label>
<!--
EOT;
if($_G[allowportait]){print <<<EOT
-->
										<label class="mr20" for="facetype2"><input type="radio" id="facetype2" name="facetype" value="2" onclick="CkFaceType(this.value)">头像链接</label>
<!--
EOT;
}if($db_ifupload && $_G[upload]){print <<<EOT
-->
										<label class="mr20" for="facetype3"><input type="radio" id="facetype3" name="facetype" value="3" onclick="CkFaceType(this.value)">头像上传</label>
<!--
EOT;
}print <<<EOT
-->
										<div class="c mb10"></div>
										<div id="face1" style="display:none;">
											<div id="iconbox">
												<div class="mb10">
<!--
EOT;
if ($num >= 10) {print <<<EOT
-->
                                                	<a onclick="showSystemIcon(0);" href="javascript:;" class="mr20">上一页</a>
													<a onclick="showSystemIcon(2);" href="javascript:;">下一页</a>
<!--
EOT;
}print <<<EOT
-->
												</div>
												<div class="profileFace">
                                                	<ul class="cc">
<!--
EOT;
foreach ($imgname_array as $key => $value) {print <<<EOT
-->
														<li onclick="showimage('$imgpath','$value')"><img src='$imgpath/face/$value' width="50" height="50" class="img"></li>
<!--
EOT;
}print <<<EOT
-->
													</ul>
												</div>
											</div>
											<input type="hidden" name="proicon" value="$iconfile" />
										</div>
										<div id="face2" style="display:none;">
										<table cellpadding="0" cellspacing="0" class="setTable">
											<tr>
												<td class="td"><span class="mr20">头像链接</span><input name="httpurl[0]" id="httpurl_url" value="$httpurl" class="input input_wb mr10" type="text" /> 必须以 http://开头</td>
											</tr>
											<tr>
												<td class="td"><span class="mr20"></span><input name="httpurl[1]" value="$iconwidth" class="input input_wc mr10" maxlength="3" onblur="if(1 <= this.value && this.value <= $db_imgwidth){document.images.useravatars.width = this.value;}" /> 必须是 1 -- $db_imgwidth 之间的一个整数。</td>
											</tr>
											<tr>
												<td class="td"><span class="mr20"></span><input name="httpurl[2]" value="$iconheight" class="input input_wc mr10" maxlength="3" onblur="if(1 <= this.value &&  this.value <= $db_imgheight){document.images.useravatars.height = this.value;}" /> 必须是 1 -- $db_imgheight 之间的一个整数。</td>
											</tr>
										</table>
                                        <div class="p15">当高度和宽度留空，或只设置一个值时，则根据图片原尺寸进行缩放</div>
										<input type="hidden" id="httpurl_w" name="httpurl[3]" />
										<input type="hidden" id="httpurl_h" name="httpurl[4]" />
										</div>
										<div id="face3" style="display:none;">
<!--
EOT;
if($db_bbsifopen != 1){print <<<EOT
-->
<div class="blockquote3">
抱歉，站点正处于内部开放状态，只有在完全开放状态下，才能使用头像上传功能。<br />
<span class="gray">（站点状态的后台设置路径：全局 &#187; 站点设置）</span>
</div>
<!--
EOT;
}else{print <<<EOT
-->
											<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase=" http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="500" height="405" id="FlashVars" align="middle">
												<param name="movie" value="js/face.swf" />
												<param name="FlashVars" value="$icon_encode_url" />
												<embed  width="500" height="405" src="js/face.swf" flashvars="$icon_encode_url" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"  type="application/x-shockwave-flash" />
											</object>
<!--
EOT;
}print <<<EOT
-->
										</div>
									</div>
								</td>
							</tr>
						</table>
						<div class="tac" style=" padding:1em" id="face_button">
							<span class="btn"><span><button type="submit">保存资料</button></span></span>
						</div>
					</div>
					<div style="display:none" id="info_safe">
						<table width="100%" class="setTable">
<!--
EOT;
if($ifppt){print <<<EOT
-->
							<tr>
								<th class="th">原密码</th>
								<td class="td"><input class="input input_wa mr10" type="password" maxlength="75" name="oldpwd" value="" />修改密码或电子邮箱时需要密码验证</td>
							</tr>
							<tr>
								<th class="th">新密码</th>
								<td class="td"><input class="input input_wa" type="password" maxlength="75" name="propwd" value="" /></td>
							</tr>
							<tr>
								<th class="th">确认密码</th>
								<td class="td"><input class="input input_wa" type="password" maxlength="75" name="check_pwd" value="" /></td>
							</tr>
							<tr>
								<th class="th">电子邮箱</th>
								<td class="td"><input class="input input_wa" type="text" maxlength="75" name="proemail" value="$userdb[email]" />
								<label for="propublicemail"><input type="checkbox" id="propublicemail" name="propublicemail" value="1" $ifpublic />公开电子邮箱</label></td>
							</tr>
<!--
EOT;
if($db_ifsafecv){print <<<EOT
-->
							<tr>
								<th class="th">安全问题</th>
								<td class="td">
									<select name="question" onchange="showcustomquest(this.value)" class="select_wa mr10">
										<option value="-2">不修改安全问题和答案</option>
										<option value="0">无安全问题</option><option value="1">我爸爸的出生地</option><option value="2">我妈妈的出生地</option><option value="3">我的小学校名</option><option value="4">我的中学校名</option><option value="5">我最喜欢的运动</option><option value="6">我最喜欢的歌曲</option><option value="7">我最喜欢的电影</option><option value="8" >我最喜欢的颜色</option><option value="-1">自定义问题</option>
									</select>
									<input id="customquest" style="display:none" type="text" name="customquest" class="input input_wa">
								</td>
							</tr>
							<tr>
								<th class="th">您的答案</th>
								<td class="td"><input type="text" name="answer" class="input input_wa"></td>
							</tr>
<!--
EOT;
}}else{print <<<EOT
-->
							<tr><td colspan="2" class="td">站点开启通行证功能，修改用户密码，请登录 <a href="$db_pptserverurl">$db_pptserverurl</a></td></tr>
<!--
EOT;
}print <<<EOT
-->
						</table>
<!--
EOT;
if ($ifppt) {print <<<EOT
-->
						<div class="tac p10">
							<span class="btn"><span><button type="submit">保存资料</button></span></span>
						</div>
<!--
EOT;
}print <<<EOT
-->
					</div>
					<div style="display:none" id="info_binding"></div>
<!--
EOT;
if($customfield){print <<<EOT
-->
					<div style="display:none" id="info_other">
						<table width="100%" class="setTable">
<!--
EOT;
foreach($customfield as $value){
$value[required] && $value[descrip].='（必填内容）';
$editable=(!$userdb[$value[field]]||$value[editable])?'':'disabled';
if($value[type]=='1'){
$field_type="<input class=\"input input_wa\" type=\"text\" name=\"$value[field]\" value=\"{$userdb[$value[field]]}\" $editable />";
}elseif($value[type]=='2'){
$field_type="<textarea name=\"$value[field]\" rows=\"5\" class=\"textarea_a\" $editable>{$userdb[$value[field]]}</textarea>";
}elseif($value[type]=='3'){
$field_type='';
foreach($value[options] as $v){
list($k,$v)=explode('=',$v);
$selected=$userdb[$value[field]]==$k?'selected':'';
$field_type.="<option value=\"$k\" $selected>$v</option>";
}$field_type="<select name=\"$value[field]\" class=\"select_wa\" $editable>$field_type</select>";
}print <<<EOT
-->
							<tr>
								<th class="th">$value[title]</th>
								<td class="td"><span class="mr10">$field_type</span>$value[descrip]</td>
							</tr>
<!--
EOT;
}print <<<EOT
-->
						</table>
						<div class="tac p10">
							<span class="btn"><span><button type="submit">保存资料</button></span></span>
						</div>
					</div>
<!--
EOT;
}print <<<EOT
-->
					</form>
					<div id="userbinding-node" style="display:none">
<!--
EOT;
if (($_G['userbinding'] || $ubinding) && $ubindingneedupdatepwd) {
print <<<EOT
-->
						<form action="profile.php?action=modify&" method="post">
						<input type="hidden" name="verify" value="$verifyhash" />
						<input type="hidden" value="5" name="step" />
                        	<p class="wrongTip mb10">您的帐号密码与帐号绑定中的密码不一致，请输入帐号密码来更新帐号绑定中的密码</p>
							<table width="100%" class="setTable">
								<tr>
									<th class="th">帐号密码</th>
									<td class="td"><input type="password" name="bindpassword" class="input input_wa" /></td>
								</tr>
								<tr>
									<th>&nbsp;</th>
									<td class="td"><span class="btn"><span><button type="submit">更新</button></span></span></td>
								</tr>
							</table>
						</form>
<!--
EOT;
}

if ($_G['userbinding'] && !$ubindingneedupdatepwd) {print <<<EOT
-->
						<form action="profile.php?action=modify&" method="post">
						<input type="hidden" name="verify" value="$verifyhash" />
						<input type="hidden" value="3" name="step" />
                        	<h5 class="h5 mb10"><strong>添加其他帐号</strong></h5>
							<table width="100%" class="setTable">
								<tr>
									<th class="th">用户名</th>
									<td class="td"><input type="text" name="username" class="input input_wa" /></td>
								</tr>
								<tr>
									<th class="th">密码</th>
									<td class="td"><input type="password" name="password" class="input input_wa" /></td>
								</tr>
<!--
EOT;
	if ($db_ifsafecv) {
print <<<EOT
-->
								<tr>
									<th class="th">安全问题</th>
									<td class="td"><select name="question" class="select" onchange="showcustomquest(this.value,'customquest2')"><option value="0">无安全问题</option><option value="1">我爸爸的出生地</option><option value="2">我妈妈的出生地</option><option value="3">我的小学校名</option><option value="4">我的中学校名</option><option value="5">我最喜欢的运动</option><option value="6">我最喜欢的歌曲</option><option value="7">我最喜欢的电影</option><option value="8" >我最喜欢的颜色</option><option value="-1">自定义问题</option></select> <input id="customquest2" style="display:none" type="text" name="customquest" class="input input_wa" tabindex="5" /></td>
								</tr>
								<tr>
									<th class="th">您的答案</th>
									<td class="td"><input type="text" name="answer" class="input input_wa" /></td>
								</tr>
<!--
EOT;
	}
print <<<EOT
-->
							</table>
							<div class="tac mb20" style="padding:1em"><span class="btn"><span><button type="submit">添 加</button></span></span></div>
						</form>
<!--
EOT;
}
if ($ubinding && !$ubindingneedupdatepwd) {
	$ltitle = L::config('ltitle', 'level');
print <<<EOT
-->
						<form action="profile.php?action=modify&" method="post">
						<input type="hidden" name="verify" value="$verifyhash" />
						<input type="hidden" value="4" name="step" />
                        	<h5 class="h5 mb10"><strong>已绑定帐户</strong></h5>
							<table width="100%" class="tA">
								<tr class="tr">
									<td>用户名</td>
									<td>用户组</td>
									<td>注册时间</td>
									<td>发帖数</td>
									<td>选择</td>
								</tr>
<!--
EOT;
	foreach ($ubinding as $key => $value) {print <<<EOT
-->
								<tr>
									<td><a href="{$db_userurl}$value[uid]" target="_blank">$value[username]</a></td>
									<td>{$ltitle[$value[groupid]]}</td>
									<td>$value[regdate]</td>
									<td><a href="apps.php?q=article&u=$value[uid]" target="_blank">$value[postnum]</a></td>
									<td><input type="checkbox" name="selid[]" value="$value[uid]" /></td>
								</tr>
<!--
EOT;
	}
print <<<EOT
-->
							</table>
							<div class="tac" style="padding:1em">
								<span class="bt"><span><button type="button" onclick="CheckAll(this.form)">全 选</button></span></span>
								<span class="btn"><span><button type="submit">解除绑定</button></span></span>
							</div>
						</form>

<!--
EOT;
}
print <<<EOT
-->
					</div>
				</div></td></tr></table>
            </div>
        </div>
<script>
var display = '$display';
function CkFaceType(value) {
	var facetype = document.getElementsByName('facetype');
	for (i = 0; i < facetype.length; i++) {
		if (facetype[i].value == value) {
			facetype[i].checked = true;
			if (value == '3') {
				getObj('face_button').style.display = 'none';
			}
			getObj('face' + value).style.display = '';
		} else {
			getObj('face_button').style.display = '';
			getObj('face' + facetype[i].value).style.display = 'none';
		}
	}
}
CkFaceType('$icontype');
function showimage(imgpath,value) {
	var path = imgpath + '/face/';
	facepath(path,value,false);
}
function facepath(iconurl,iconfile,showmsg,iconwidth,iconheight) {
	document.images.useravatars.src = iconurl + iconfile + '?' + new Date().getTime();
	if (iconwidth>0) document.images.useravatars.width = iconwidth;
	if (iconheight>0) document.images.useravatars.height = iconheight;
	document.creator.proicon.value = iconfile;
	return false;
}
function showSystemIcon(page) {
	getObj('iconbox').innerHTML = '<div class="tac" style="width:272px;padding:30px 0 0;"><div><img src="'+imgpath+'/loading.gif" align="absmiddle" /> 正在加载数据...</div></div>';
	ajax.send('pw_ajax.php?action=showface&page='+page,'',getIcon);
}

function getIcon() {
	var iconlist = ajax.request.responseText;
	setTimeout(function(){getObj('iconbox').innerHTML = iconlist;},300);
}

function SetCookie(name,value) {
	expires = new Date();
	expires.setTime(expires.getTime()+(86400*365));
	document.cookie=name+"="+escape(value)+"; expires="+expires.toGMTString()+"; path=/";
}

function DelCookie(name) {
	expires = new Date();
	expires.setTime(expires.getTime()-(86400*365));
	document.cookie=name+"=; expires="+expires.toGMTString()+"; path=/";
}

function FetchCookie(name) {
	var start = document.cookie.indexOf(name);
	var end = document.cookie.indexOf(";",start);
	return start==-1 ? null : unescape(document.cookie.substring(start+name.length+1,(end>start ? end : document.cookie.length)));
}

function setFaceLen() {
	var v = 0;
	var facetype = document.getElementsByName('facetype');
	for (i = 0; i < facetype.length; i++) {
		if (facetype[i].checked === true) {
			v = facetype[i].value;break
		}
	}
	if (v == 2) {
		var img = new Image();
		img.src = getObj('httpurl_url').value;
		getObj('httpurl_w').value = img.width;
		getObj('httpurl_h').value = img.height;
	}
	return true;
}
function selectTab(tab) {
	showTabs('infolist', tab, 'li', 'current');
	getObj('userbinding-node').style.display = (tab == 'binding') ? '' : 'none';
}

function checkMobile() {
	var url = 'profile.php?action=auth&check_step=mobile';
	var mobile = getObj('td_input_mobile').value;

	if (mobile != '' && typeof (mobile) != 'undefined') {
		url += '&check_mobile='+mobile;
	}
	window.location.href = url;
}

~function() {
	var info_type = FetchCookie('pro_tab');
	DelCookie('pro_tab');
	if (!info_type) info_type = '$info_type';
	selectTab(info_type);
}();
</script>
<!--
EOT;
require_once uTemplate::printEot('footer');
?>-->